Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

188
Visualizações
TypeError: Cannot read property "date_config" from undefined

I am trying to use the code below and while using apps script it gives me the error, described below:

"TypeError: Cannot read property "date_config" from undefined."

My code looks like that:

function getConfig() {
  var config = cc.getConfig();
  config.setDateRangeRequired(true);
  config
    .newSelectSingle()
    .setId('date_config')
    .setName('Select date preset')
    .setHelpText('Select the date preset for which you would like to receive the ads data.')
    .setAllowOverride(true)
    .addOption(config.newOptionBuilder().setLabel('Today').setValue('today'))
    .addOption(config.newOptionBuilder().setLabel('Yesterday').setValue('yesterday'))
    .addOption(config.newOptionBuilder().setLabel('This week (Sunday to today)').setValue('this_week_sun_today'))
    .addOption(config.newOptionBuilder().setLabel('Last week (Sunday to Saturday)').setValue('last_week_sun_sat'))
    .addOption(config.newOptionBuilder().setLabel('Last week (Monday to Sunday)').setValue('last_week_mon_sun'))
    .addOption(config.newOptionBuilder().setLabel('This month').setValue('this_month'))
    .addOption(config.newOptionBuilder().setLabel('Last month').setValue('last_month'))
    .addOption(config.newOptionBuilder().setLabel('This quarter').setValue('this_quarter'))
    .addOption(config.newOptionBuilder().setLabel('Last three days').setValue('last_3d'))
    .addOption(config.newOptionBuilder().setLabel('Last seven days').setValue('last_7d'))
    .addOption(config.newOptionBuilder().setLabel('Last 28 days').setValue('last_28d'))
    .addOption(config.newOptionBuilder().setLabel('Last 30 days').setValue('last_30d'))
    .addOption(config.newOptionBuilder().setLabel('Last 90 days').setValue('last_90d'))
    .addOption(config.newOptionBuilder().setLabel('This year').setValue('this_year'))
    .addOption(config.newOptionBuilder().setLabel('Last year').setValue('last_year'))
    .addOption(config.newOptionBuilder().setLabel('Maximum').setValue('maximum'))

  return config.build();
}
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda